MACRO dn ;; (note, instr, effect)
    db (\1 | ((\2 & %00010000) << 3))
    db (((\2 << 4) & $FF) | (\3 >> 8))
    db LOW(\3)
ENDM

C_3 EQU 0
C#3 EQU 1
D_3 EQU 2
D#3 EQU 3
E_3 EQU 4
F_3 EQU 5
F#3 EQU 6
G_3 EQU 7
G#3 EQU 8
A_3 EQU 9
A#3 EQU 10
B_3 EQU 11
C_4 EQU 12
C#4 EQU 13
D_4 EQU 14
D#4 EQU 15
E_4 EQU 16
F_4 EQU 17
F#4 EQU 18
G_4 EQU 19
G#4 EQU 20
A_4 EQU 21
A#4 EQU 22
B_4 EQU 23
C_5 EQU 24
C#5 EQU 25
D_5 EQU 26
D#5 EQU 27
E_5 EQU 28
F_5 EQU 29
F#5 EQU 30
G_5 EQU 31
G#5 EQU 32
A_5 EQU 33
A#5 EQU 34
B_5 EQU 35
C_6 EQU 36
C#6 EQU 37
D_6 EQU 38
D#6 EQU 39
E_6 EQU 40
F_6 EQU 41
F#6 EQU 42
G_6 EQU 43
G#6 EQU 44
A_6 EQU 45
A#6 EQU 46
B_6 EQU 47
C_7 EQU 48
C#7 EQU 49
D_7 EQU 50
D#7 EQU 51
E_7 EQU 52
F_7 EQU 53
F#7 EQU 54
G_7 EQU 55
G#7 EQU 56
A_7 EQU 57
A#7 EQU 58
B_7 EQU 59
C_8 EQU 60
C#8 EQU 61
D_8 EQU 62
D#8 EQU 63
E_8 EQU 64
F_8 EQU 65
F#8 EQU 66
G_8 EQU 67
G#8 EQU 68
A_8 EQU 69
A#8 EQU 70
B_8 EQU 71
LAST_NOTE EQU 72
___ EQU 90 ; the default "no note" value
NO_NOTE EQU ___